-- @Author: 作者QQ381990860
-- @Date:   2021-11-05 10:34:34
-- @Last Modified by:   作者QQ381990860
-- @Last Modified time: 2022-09-03 14:51:17
--======================================================================--
-- @作者: QQ381990860
-- @创建时间:   2019-12-03 02:17:19
-- @Last Modified time: 2020-11-21 16:46:24
--======================================================================--
local 场景类_创建 = class()
local bwh = require("gge包围盒")
local bw = bwh(0,0,56,46)
local bw1 = bwh(0,0,56,46)
local tp
local mouseb = 引擎.鼠标按下


function 场景类_创建:初始化(根)

  tp = 根
  self.人物列表 = {
  [1]= {
  {模型="飞燕女",x=212,y=35,染色方案=3},
   {模型="英女侠",x=308,y=35,染色方案=4},
   {模型="巫蛮儿",x=404,y=35,染色方案=2083},
   {模型="偃无师",x=500,y=35,染色方案=18},
   {模型="逍遥生",x=594,y=35,染色方案=1},
   {模型="剑侠客",x=689,y=35,染色方案=2}},
   [2]={
   {模型="狐美人",x=212,y=35,染色方案=7},
   {模型="骨精灵",x=308,y=35,染色方案=8},
   {模型="鬼潇潇",x=404,y=35,染色方案=18},
   {模型="杀破狼",x=500,y=35,染色方案=18},
   {模型="巨魔王",x=594,y=35,染色方案=5},
   {模型="虎头怪",x=689,y=35,染色方案=6}
   },
   [3]={
   {模型="舞天姬",x=212,y=35,染色方案=11},
    {模型="玄彩娥",x=308,y=35,染色方案=12},
   {模型="桃夭夭",x=404,y=35,染色方案=18},
   {模型="羽灵神",x=500,y=35,染色方案=2081},
   {模型="神天兵",x=594,y=35,染色方案=9},
  {模型="龙太子",x=689,y=35,染色方案=10}}}




  self.选中人物 = 0
  self.选择人物 = false
  self.dz = "静立"
  self.fx = 4
  self.染色ID = 0
  --self.jswb = 根._丰富文本(250,81)
  local 资源 = 根.资源
  --self.jswb:置行度(-1)




  self.人物随机名字 = 根._按钮.创建(资源:载入("MAX.7z","网易WDF动画",201),0,0,3,true,true)

    self.状态=1
  -- self.xmsrk = 资源:载入('JM.dll',"网易WDF动画",0x1BA268A5)
  -- self.染色切换 = 资源:载入('JM.dll',"网易WDF动画",0x5C939428)
  self.ztx = {[1]={},[2]={},[3]={}}
  self.dtx = {[1]={},[2]={},[3]={}}
  self.dh ={[1]={},[2]={},[3]={}}
 self.文字 ={[1]={},[2]={},[3]={}}
  for n=1,3 do
    for c=1,6 do

    local s =  ModelData[self.人物列表[n][c].模型]
    local q = 取模型(self.人物列表[n][c].模型)

    self.文字[n][c]=资源:载入(self.人物列表[n][c].模型..".png","加密图片")

  
    self.ztx[n][c] = 资源:载入(s.头像资源,"网易WDF动画",s.头像组.创建)
    self.dtx[n][c] = 资源:载入("MAX.7z","网易WDF动画",s.头像组.人物)
    self.dh[n][c] = {}
    self.dh[n][c]["静立"] = 资源:载入(q.资源,"网易WDF动画",q.静立)
    self.dh[n][c]["行走"] = 资源:载入(q.资源,"网易WDF动画",q.行走)
    self.dh[n][c]["攻击"] = 资源:载入(q.战斗资源,"网易WDF动画",q.攻击)
    self.dh[n][c]["施法"] = 资源:载入(q.战斗资源,"网易WDF动画",q.施法)

    self.人物列表[n][c].x = self.人物列表[n][c].x
    self.人物列表[n][c].y = self.人物列表[n][c].y
  end
end
  local 按钮 = tp._按钮
  self.影子 = 资源:载入('JM.dll',"网易WDF动画",0xDCE4B562)
  self.选择框 = 资源:载入('JM.dll',"网易WDF动画",0x37DD63ED)
  self.背景={
   [1]=资源:载入("背景1.png","加密图片"),
   [2]=资源:载入("背景2.png","加密图片"),
   [3]=资源:载入("背景3.png","加密图片"),

 }
  self.一号染色 =   按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true," 1")
    self.一号染色:置文字颜色(0xFF703B3B)
    self.一号染色:置偏移(7,5)

  self.二号染色 =  按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true," 2")
      self.二号染色:置文字颜色(0xFF703B3B)
    self.二号染色:置偏移(7,5)
  self.三号染色 =  按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true," 3")
      self.三号染色:置文字颜色(0xFF703B3B)
    self.三号染色:置偏移(7,5)
  self.人物站立 =   按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true,"站立")
      self.人物站立:置文字颜色(0xFF703B3B)
    self.人物站立:置偏移(7,5)
  self.人物奔跑 =   按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true,"奔跑")
     self.人物奔跑:置文字颜色(0xFF703B3B)
   self.人物奔跑:置偏移(7,5)
  self.人物攻击 =  按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true,"攻击")
      self.人物攻击:置文字颜色(0xFF703B3B)
    self.人物攻击:置偏移(7,5)
  self.人物施法 =   按钮.创建(资源:载入('MAX.7z',"网易WDF动画",200),0,0,3,true,true,"施法")
    self.人物施法:置文字颜色(0xFF703B3B)
    self.人物施法:置偏移(7,5)






  self.后退一个方向 =  按钮.创建(资源:载入('MAX.7z',"网易WDF动画",202),0,0,3,true,true)
  self.前进一个方向 =  按钮.创建(资源:载入('MAX.7z',"网易WDF动画",203),0,0,3,true,true)
  -- 公用
  self.上一步 =   根._按钮(资源:载入('MAX.7z',"网易WDF动画",00010009),0,0,3,true,true)
  self.下一步 =  根._按钮(资源:载入('MAX.7z',"网易WDF动画",00010003),0,0,3,true,true)
  -- 控件
  self.控件类 = require("ggeui/加载类")()
  local 总控件 = self.控件类:创建控件('创建控件')
  总控件:置可视(true,true)
  self.mc = 总控件:创建输入("创建输入",250+(全局登陆宽度-800)/2,560,110,14,根)
  self.mc:置可视(false,false)
  self.mc:置限制字数(10)
end

function 场景类_创建:置方向(方向,n)
  self.dh[self.状态][n]["静立"]:置方向(方向)
  self.dh[self.状态][n]["行走"]:置方向(方向)
  self.dh[self.状态][n]["攻击"]:置方向(取四至八方向(方向))
  self.dh[self.状态][n]["施法"]:置方向(取四至八方向(方向))
end

function 场景类_创建:置染色(id,染色方案,染色ID,方向)
  self.dh[self.状态][id]["静立"]:置染色(染色方案,染色ID,染色ID,染色ID)
  self.dh[self.状态][id]["行走"]:置染色(染色方案,染色ID,染色ID,染色ID)
  self.dh[self.状态][id]["攻击"]:置染色(染色方案,染色ID,染色ID,染色ID)
  self.dh[self.状态][id]["施法"]:置染色(染色方案,染色ID,染色ID,染色ID)
  self:置方向(方向,id)
end

function 场景类_创建:后退方向()
  if self.fx ~= 7 then
    self.fx = self.fx + 1
    self:置方向(self.fx,self.选中人物)
  end
end

function 场景类_创建:前进方向()
  if self.fx ~= 0 then
    self.fx = self.fx - 1
    self:置方向(self.fx,self.选中人物)
  end
end



function 场景类_创建:显示(dt,x,y)
  if self.选中人物 ~= 0 then
    self.dh[self.状态][self.选中人物][self.dz]:更新(dt)
  end






   self.背景[self.状态]:显示(0,0)
    bw:置坐标(15,3)
    bw1:置坐标(10,75)
  if self.状态==1 then--人
    if bw:检查点(x,y) and 引擎.鼠标按下(0) then
      self.状态=2
    elseif bw1:检查点(x,y) and 引擎.鼠标按下(0) then
       self.状态=3
    end
  elseif self.状态==2 then
        if bw:检查点(x,y) and 引擎.鼠标按下(0) then
      self.状态=3
    elseif bw1:检查点(x,y) and 引擎.鼠标按下(0) then
       self.状态=1
    end
  elseif self.状态==3 then
        if bw:检查点(x,y) and 引擎.鼠标按下(0) then
      self.状态=1
    elseif bw1:检查点(x,y) and 引擎.鼠标按下(0) then
       self.状态=2
    end
  end


          -- 引擎.画矩形(15,3,76,56,-3551379)
          -- 引擎.画矩形(10,75,66,131,-3551379)

  self.后退一个方向:更新(x,y)
  self.前进一个方向:更新(x,y)
  self.人物随机名字:更新(x,y)
  self.一号染色:更新(x,y)
  self.二号染色:更新(x,y)
  self.三号染色:更新(x,y)
  self.人物站立:更新(x,y)
  self.人物奔跑:更新(x,y)
  self.人物攻击:更新(x,y)
  self.人物施法:更新(x,y)
  self.上一步:更新(x,y)
  self.下一步:更新(x,y)
  if self.选中人物 ~= 0 then
    self.控件类:更新(dt,x,y)
    if self.后退一个方向:事件判断() then
      self:前进方向()
    elseif self.前进一个方向:事件判断() then

      self:后退方向()
    elseif self.人物站立:事件判断() then
      self.dz = "静立"
    elseif self.人物奔跑:事件判断() then
      self.dz = "行走"
    elseif self.人物攻击:事件判断() then
      self.dz = "攻击"
    elseif self.人物施法:事件判断() then
      self.dz = "施法"
    elseif self.一号染色:事件判断() then
      if DyeData[self.人物列表[self.状态][self.选中人物].模型][1] ~= nil then  
        if self.染色ID ~= 0 then
          self.染色ID = 0
          self:置方向(0,self.选中人物)
          self:置染色(self.选中人物,DyeData[self.人物列表[self.状态][self.选中人物].模型][1],self.染色ID,self.fx)
        end
      else
        tp.提示:写入("#Y/该角色暂未开放染色")
      end
    elseif self.二号染色:事件判断() then
      if DyeData[self.人物列表[self.状态][self.选中人物].模型][1] ~= nil  then
        if self.染色ID ~= 1 then
          self.染色ID = 1
          self:置方向(0,self.选中人物)
          self:置染色(self.选中人物,DyeData[self.人物列表[self.状态][self.选中人物].模型][1],self.染色ID,self.fx)
        end
      else
        tp.提示:写入("#Y/该角色暂未开放染色")
      end
    elseif self.三号染色:事件判断() then
      if DyeData[self.人物列表[self.状态][self.选中人物].模型][1] ~= nil then
        if self.染色ID ~= 2 then
          self.染色ID = 2
          self:置方向(0,self.选中人物)
          self:置染色(self.选中人物,DyeData[self.人物列表[self.状态][self.选中人物].模型][1],self.染色ID,self.fx)
        end
      else
        tp.提示:写入("#Y/该角色暂未开放染色")
      end

    elseif self.人物随机名字:事件判断()   then
      local 姓 = {

         "守护九宠飞","守护九宠菁","守护九宠璟","守护九宠擎","守护九宠鲛","守护九宠段","守护九宠益","守护九宠伸","守护九宠闻","守护九宠乔","守护九宠朴","守护九宠宸","守护九宠鹏","守护九宠祚","守护九宠莱",
         "守护九宠昴","守护九宠闻","守护九宠朗","守护九宠黎","守护九宠邦","守护九宠挺","守护九宠旭","守护九宠茗","守护九宠信","守护九宠学","守护九宠全","守护九宠儒","守护九宠鹏","守护九宠合","守护九宠仝",
         "守护九宠强","守护九宠挺","守护九宠珹","守护九宠信","守护九宠众","守护九宠瑎","守护九宠绍","守护九宠致","守护九宠飞","守护九宠厚","守护九宠掣","守护九宠葆","守护九宠朕","守护九宠弘","守护九宠曾",
         "守护九宠以","守护九宠石","守护九宠澔","守护九宠昮","守护九宠民","守护九宠保","守护九宠祖","守护九宠彬","守护九宠源","守护九宠综","守护九宠德","守护九宠骢","守护九宠良","守护九宠濮","守护九宠杰",
         "守护九宠殿","守护九宠弘","守护九宠虚","守护九宠缜","守护九宠海","守护九宠辉","守护九宠骢","守护九宠炜","守护九宠部","守护九宠选","守护九宠竹","守护九宠濮","守护九宠亨","守护九宠促","守护九宠龄",
         "守护九宠棋","守护九宠铸","守护九宠崇","守护九宠昮","守护九宠易","守护九宠琒","守护九宠势","守护九宠时","守护九宠峰","守护九宠沛","守护九宠启","守护九宠众","守护九宠禅","守护九宠村","守护九宠驾",
         "守护九宠澉","守护九宠合","守护九宠汉","守护九宠汗","守护九宠墨","守护九宠耘","守护九宠凌","守护九宠盈","守护九宠佑","守护九宠朋","守护九宠绍","守护九宠琛","守护九宠辉","守护九宠浦","守护九宠嗣",
         "守护九宠暠","守护九宠晴","守护九宠轼","守护九宠驹","守护九宠壮","守护九宠沛","守护九宠松","守护九宠义","守护九宠峰","守护九宠玮","守护九宠致","守护九宠进","守护九宠榕","守护九宠浦","守护九宠承",
         "守护九宠侃","守护九宠曹","守护九宠弘","守护九宠迈","守护九宠含","守护九宠黎","守护九宠吏","守护九宠茂","守护九宠创","守护九宠瑜","守护九宠殿","守护九宠有","守护九宠诗","守护九宠奕","守护九宠志",
         "守护九宠颔","守护九宠辑","守护九宠攀","守护九宠综","守护九宠稼","守护九宠宽","守护九宠宁","守护九宠晋","守护九宠舷","守护九宠穆","守护九宠昕","守护九宠榕","守护九宠亭","守护九宠伸","守护九宠富",
         "守护九宠佑","守护九宠明","守护九宠亭","守护九宠森","守护九宠利","守护九宠发","守护九宠禅","守护九宠蒲","守护九宠丞","守护九宠凯","守护九宠生","守护九宠海","守护九宠展","守护九宠灏","守护九宠竦",
         "守护九宠启","守护九宠以","守护九宠旷","守护九宠学","守护九宠尧","守护九宠冕","守护九宠魁","守护九宠君","守护九宠琳","守护九宠俊","守护九宠健","守护九宠彦","守护九宠仕","守护九宠易","守护九宠密",
         "守护九宠筠","守护九宠韩","守护九宠仑","守护九宠马","守护九宠祥","守护九宠哲","守护九宠颔","守护九宠震","守护九宠山","守护九宠元","守护九宠桓","守护九宠综","守护九宠辑","守护九宠谚","守护九宠缜",
         "守护九宠汶","守护九宠圣","守护九宠广","守护九宠亨","守护九宠纲","守护九宠成","守护九宠镰","守护九宠砂","守护九宠欧","守护九宠利","守护九宠合","守护九宠阳","守护九宠曾","守护九宠奕","守护九宠竦",
         "守护九宠绪","守护九宠恒","守护九宠部","守护九宠鑫","守护九宠仑","守护九宠彬","守护九宠偿","守护九宠守","守护九宠旻","守护九宠键","守护九宠敬","守护九宠铸","守护九宠岩","守护九宠弼","守护九宠顺",
         "守护九宠骄","守护九宠欧","守护九宠矢","守护九宠尊","守护九宠端","守护九宠僖","守护九宠辉","守护九宠众","守护九宠毅","守护九宠明","守护九宠群","守护九宠寒","守护九宠劭","守护九宠仇","守护九宠孺",
         "守护九宠助","守护九宠绮","守护九宠龄","守护九宠棠","守护九宠帝","守护九宠金","守护九宠宏","守护九宠实","守护九宠菁","守护九宠渝","守护九宠谊","守护九宠帅","守护九宠川","守护九宠梁","守护九宠茗",
         "守护九宠琩","守护九宠奇","守护九宠浩","守护九宠选","守护九宠进","守护九宠宋","守护九宠参","守护九宠苓","守护九宠孜","守护九宠朋","守护九宠驾","守护九宠铖","守护九宠广","守护九宠昮","守护九宠函",
         "守护九宠博","守护九宠义","守护九宠中","守护九宠含","守护九宠伸","守护九宠尧","守护九宠子","守护九宠保","守护九宠进","守护九宠骞","守护九宠斋","守护九宠亮","守护九宠利","守护九宠攀","守护九宠敬",
         "守护九宠全","守护九宠仇","守护九宠暠","守护九宠瑜","守护九宠劻","守护九宠竣","守护九宠武","守护九宠武","守护九宠宪","守护九宠勰","守护九宠泽","守护九宠士","守护九宠恩","守护九宠斋","守护九宠基",
         "守护九宠厚","守护九宠鸣","守护九宠战","守护九宠筠","守护九宠昴","守护九宠佐","守护九宠琒","守护九宠轮","守护九宠煊","守护九宠鸣","守护九宠碫","守护九宠学","守护九宠轩","守护九宠勰","守护九宠轮",
         "守护九宠棋","守护九宠琦","守护九宠有","守护九宠俯","守护九宠则","守护九宠朴","守护九宠平","守护九宠碧","守护九宠众","守护九宠创","守护九宠源","守护九宠舜","守护九宠佩","守护九宠建","守护九宠仝",
         "守护九宠飙","守护九宠偿","守护九宠代","守护九宠仁","守护九宠碫","守护九宠富","守护九宠殿","守护九宠松","守护九宠拯","守护九宠和","守护九宠操","守护九宠骥","守护九宠鲲","守护九宠嘉","守护九宠固",
         "守护九宠竣","守护九宠震","守护九宠仁","守护九宠阔","守护九宠问","守护九宠柴","守护九宠俟","守护九宠前","守护九宠灏","守护九宠庭","守护九宠俣","守护九宠栋","守护九宠榜","守护九宠琩","守护九宠哲",
         "守护九宠群","守护九宠骄","守护九宠世","守护九宠列","守护九宠挺","守护九宠飒","守护九宠昊","守护九宠颇","守护九宠俯","守护九宠仇","守护九宠士","守护九宠则","守护九宠汶","守护九宠富","守护九宠源",
         "守护九宠融","守护九宠驾","守护九宠风","守护九宠魏","守护九宠菁","守护九宠乾","守护九宠仕","守护九宠绮","守护九宠淏","守护九宠瑜","守护九宠诚","守护九宠振","守护九宠佩","守护九宠颇","守护九宠澔",
         "守护九宠若","守护九宠星","守护九宠洲","守护九宠创","守护九宠旲","守护九宠春","守护九宠瑾","守护九宠仝","守护九宠镇","守护九宠冠","守护九宠飞","守护九宠寒","守护九宠弢","守护九宠澉","守护九宠固",
         "守护九宠伸","守护九宠汶","守护九宠偿","守护九宠永","守护九宠轼","守护九宠谦","守护九宠部","守护九宠善","守护九宠中","守护九宠文","守护九宠虚","守护九宠宏","守护九宠祖","守护九宠军","守护九宠尧",
         "守护九宠新","守护九宠碫","守护九宠文","守护九宠帝","守护九宠涛","守护九宠铠","守护九宠鲛","守护九宠修","守护九宠亮","守护九宠之","守护九宠韩","守护九宠基","守护九宠龄","守护九宠俊","守护九宠铿",
         "守护九宠君","守护九宠昕","守护九宠风","守护九宠国","守护九宠棠","守护九宠友","守护九宠飒","守护九宠辅","守护九宠滕","守护九宠佐","守护九宠昂","守护九宠义","守护九宠洲","守护九宠恒","守护九宠豹",
         "守护九宠参","守护九宠铠","守护九宠昂","守护九宠逸","守护九宠日","守护九宠壮","守护九宠武","守护九宠勇","守护九宠刚","守护九宠生","守护九宠榜","守护九宠佩","守护九宠宁","守护九宠掣","守护九宠颔",
         "守护九宠颔","守护九宠绪","守护九宠海","守护九宠刚","守护九宠丕","守护九宠坚","守护九宠旭","守护九宠蔚","守护九宠丕","守护九宠竦","守护九宠庆","守护九宠达","守护九宠炅","守护九宠列","守护九宠倧",
         "守护九宠宇","守护九宠昂","守护九宠振","守护九宠宪","守护九宠沅","守护九宠振","守护九宠榕","守护九宠帅","守护九宠勒","守护九宠辅","守护九宠畴","守护九宠曾","守护九宠澔","守护九宠佳","守护九宠澎",
         "守护九宠攀","守护九宠明","守护九宠光","守护九宠乒","守护九宠涛","守护九宠顺","守护九宠顺","守护九宠阔","守护九宠祖","守护九宠玚","守护九宠霆","守护九宠光","守护九宠裕","守护九宠琮","守护九宠世",
         "守护九宠汶","守护九宠琸","守护九宠霆","守护九宠珹","守护九宠良","守护九宠生","守护九宠浩","守护九宠书","守护九宠言","守护九宠心","守护九宠澉","守护九宠东","守护九宠骏","守护九宠彦","守护九宠勰",
         "守护九宠伸","守护九宠承","守护九宠驹","守护九宠航","守护九宠炎","守护九宠珺","守护九宠妍","守护九宠律","守护九宠促","守护九宠帝","守护九宠璟","守护九宠沧","守护九宠宣","守护九宠翔","守护九宠功",
         "守护九宠渝","守护九宠纲","守护九宠清","守护九宠阳","守护九宠鲛","守护九宠朴","守护九宠棋","守护九宠竦","守护九宠良","守护九宠晟","守护九宠赐","守护九宠森","守护九宠全","守护九宠新","守护九宠庚",
         "守护九宠亦","守护九宠庭","守护九宠庆","守护九宠真","守护九宠信","守护九宠翰","守护九宠律","守护九宠益","守护九宠实","守护九宠骥","守护九宠高","守护九宠茗","守护九宠仝","守护九宠乾","守护九宠盈",
         "守护九宠克","守护九宠沅","守护九宠镇","守护九宠瀛","守护九宠耘","守护九宠弩","守护九宠渊","守护九宠碧","守护九宠参","守护九宠轮","守护九宠延","守护九宠祚","守护九宠碫","守护九宠炅","守护九宠昕",
         "守护九宠彰","守护九宠利","守护九宠晷","守护九宠易","守护九宠松","守护九宠勒","守护九宠辈","守护九宠弓","守护九宠珹","守护九宠宽","守护九宠侃","守护九宠偿","守护九宠铖","守护九宠创","守护九宠伋",
         "守护九宠砂","守护九宠佺","守护九宠暠","守护九宠仇","守护九宠赐","守护九宠栋","守护九宠舱","守护九宠炜","守护九宠伋","守护九宠修","守护九宠波","守护九宠胜","守护九宠宋","守护九宠拯","守护九宠鸿",
         "守护九宠龙","守护九宠代","守护九宠魏","守护九宠冕","守护九宠羚","守护九宠旻","守护九宠刚","守护九宠砂","守护九宠良","守护九宠颁","守护九宠飞","守护九宠凡","守护九宠冕","守护九宠斋","守护九宠朴",
         "守护九宠州","守护九宠弓","守护九宠恬","守护九宠平","守护九宠有","守护九宠沅","守护九宠信","守护九宠瑜","守护九宠储","守护九宠合","守护九宠维","守护九宠镰","守护九宠新","守护九宠镰","守护九宠尧",
         "守护九宠保","守护九宠恬","守护九宠耘","守护九宠维","守护九宠蒲","守护九宠林","守护九宠朋","守护九宠铿","守护九宠黄","守护九宠孜","守护九宠山","守护九宠缜","守护九宠辰","守护九宠乐","守护九宠盛",
         "守护九宠澉","守护九宠若","守护九宠震","守护九宠冕","守护九宠啸","守护九宠亦","守护九宠濮","守护九宠勇","守护九宠示","守护九宠沛","守护九宠铿","守护九宠澔","守护九宠轼","守护九宠君","守护九宠彬",
         "守护九宠驹","守护九宠仑","守护九宠斌","守护九宠绮","守护九宠祥","守护九宠璟","守护九宠谊","守护九宠魁","守护九宠俊","守护九宠昪","守护九宠波","守护九宠成","守护九宠延","守护九宠山","守护九宠利",
         "守护九宠澎","守护九宠朕","守护九宠吏","守护九宠溢","守护九宠飒","守护九宠政","守护九宠彦","守护九宠琳","守护九宠天","守护九宠乒","守护九宠昕","守护九宠渝","守护九宠驹","守护九宠腾","守护九宠兴",
         "守护九宠智","守护九宠亭","守护九宠沧","守护九宠纲","守护九宠战","守护九宠迈","守护九宠嘉","守护九宠修","守护九宠弼","守护九宠晷","守护九宠鲛","守护九宠恬","守护九宠巡","守护九宠固","守护九宠镰",
         "守护九宠昮","守护九宠昌","守护九宠玮","守护九宠浩","守护九宠弓","守护九宠才","守护九宠崈","守护九宠端","守护九宠邦","守护九宠豹","守护九宠俊","守护九宠仞","守护九宠昌","守护九宠东","守护九宠佐",
         "守护九宠以","守护九宠羚","守护九宠敬","守护九宠段","守护九宠永","守护九宠飞","守护九宠拯","守护九宠稼","守护九宠仓","守护九宠列","守护九宠锋","守护九宠段","守护九宠宁","守护九宠凡","守护九宠泽",
         "守护九宠部","守护九宠墨","守护九宠木","守护九宠进","守护九宠征","守护九宠铎","守护九宠曾","守护九宠彦","守护九宠僖","守护九宠晸","守护九宠飚","守护九宠助","守护九宠禅","守护九宠启","守护九宠佑",
         "守护九宠辈","守护九宠阔","守护九宠勋","守护九宠蚩","守护九宠汉","守护九宠延","守护九宠丕","守护九宠仓","守护九宠冠","守护九宠健","守护九宠国","守护九宠畴","守护九宠守","守护九宠璟","守护九宠俊",
         "守护九宠畴","守护九宠崇","守护九宠众","守护九宠征","守护九宠保","守护九宠宰","守护九宠啸","守护九宠旭","守护九宠邶","守护九宠利","守护九宠博","守护九宠轩","守护九宠裕","守护九宠玄","守护九宠琩",
         "守护九宠瑜","守护九宠若","守护九宠克","守护九宠佳","守护九宠宰","守护九宠曹","守护九宠骢","守护九宠霆","守护九宠暠","守护九宠部","守护九宠鹰","守护九宠善","守护九宠实","守护九宠宏","守护九宠虚",
         "守护九宠玮","守护九宠御","守护九宠昌","守护九宠坚","守护九宠拯","守护九宠珺","守护九宠森","守护九宠庭","守护九宠康","守护九宠利","守护九宠容","守护九宠魁","守护九宠澜","守护九宠矗","守护九宠仓",
         "守护九宠浦","守护九宠亨","守护九宠弩","守护九宠泉","守护九宠伟","守护九宠庆","守护九宠康","守护九宠晷","守护九宠玮","守护九宠明","守护九宠宪","守护九宠飚","守护九宠琸","守护九宠树","守护九宠瀛",
         "守护九宠旁","守护九宠琮","守护九宠浩","守护九宠旲","守护九宠偿","守护九宠滕","守护九宠赐","守护九宠日","守护九宠贤","守护九宠融","守护九宠仓","守护九宠志","守护九宠佩","守护九宠克","守护九宠佑",
         "守护九宠榜","守护九宠昪","守护九宠桦","守护九宠昌","守护九宠仑","守护九宠峻","守护九宠慕","守护九宠御","守护九宠富","守护九宠段","守护九宠玄","守护九宠心","守护九宠绮","守护九宠金","守护九宠延",
         "守护九宠侃","守护九宠喆","守护九宠轼","守护九宠俟","守护九宠荣","守护九宠国","守护九宠啸","守护九宠鹰","守护九宠益","守护九宠颇","守护九宠旲","守护九宠参","守护九宠光","守护九宠汶","守护九宠征",
         "守护九宠会","守护九宠旲","守护九宠盛","守护九宠操","守护九宠曾","守护九宠旁","守护九宠备","守护九宠冕","守护九宠稼","守护九宠琛","守护九宠儒","守护九宠庭","守护九宠竦","守护九宠昪","守护九宠俣",
         "守护九宠哲","守护九宠杰","守护九宠轩","守护九宠谦","守护九宠才","守护九宠哲","守护九宠国","守护九宠榕","守护九宠瀛","守护九宠时","守护九宠封","守护九宠澜","守护九宠贤","守护九宠浩","守护九宠诤",
         "守护九宠飒","守护九宠禅","守护九宠羚","守护九宠豹","守护九宠州","守护九宠真","守护九宠辑","守护九宠坤","守护九宠榜","守护九宠裕","守护九宠滕","守护九宠辰","守护九宠卿","守护九宠健","守护九宠稹",
         "守护九宠勇","守护九宠庚","守护九宠真","守护九宠竦","守护九宠贵","守护九宠宪","守护九宠金","守护九宠山","守护九宠朕","守护九宠发","守护九宠巡","守护九宠稹","守护九宠栋","守护九宠倝","守护九宠玮",
         "守护九宠壮","守护九宠绍","守护九宠善","守护九宠澜","守护九宠蚩","守护九宠亮","守护九宠承","守护九宠永","守护九宠蒲","守护九宠雄","守护九宠炜","守护九宠民","守护九宠宋","守护九宠孜","守护九宠树",
         "守护九宠碧","守护九宠嗣","守护九宠示","守护九宠炎","守护九宠壮","守护九宠厚","守护九宠永","守护九宠福","守护九宠庚","守护九宠勘","守护九宠镇","守护九宠敬","守护九宠朴","守护九宠州","守护九宠祚",
         "守护九宠承","守护九宠筠","守护九宠昮","守护九宠众","守护九宠坚","守护九宠钧","守护九宠任","守护九宠启","守护九宠崇","守护九宠宣","守护九宠绮","守护九宠劭","守护九宠榜","守护九宠勋","守护九宠致",
         "守护九宠旲","守护九宠亭","守护九宠魏","守护九宠全","守护九宠兴","守护九宠涛","守护九宠祚","守护九宠庚","守护九宠宗","守护九宠怡"

    }

      local 组合 = 姓[取随机数(1,#姓)]
      self.mc:置文本(组合)
end
  end

  for n=1,6 do
    self.ztx[self.状态][n]:显示(self.人物列表[self.状态][n].x+(全局登陆宽度-800)/2,self.人物列表[self.状态][n].y)
    if self.ztx[self.状态][n]:是否选中(x,y) then
      self.选择框:更新(dt)
      self.选择框:显示(self.人物列表[self.状态][n].x+(全局登陆宽度-800)/2,self.人物列表[self.状态][n].y)
      if mouseb(0) and self.选中人物 ~= n then
        self.选中人物 = n
        self.dz = "静立"
        self.fx = 4
        self.染色ID = 0

        if DyeData[self.人物列表[self.状态][self.选中人物].模型][1] ~= nil  then
          self:置染色(self.选中人物,DyeData[self.人物列表[self.状态][self.选中人物].模型][1],self.染色ID,self.fx)
        end
        self:置方向(self.fx,self.选中人物)
      end
    end
  end

  self.后退一个方向:显示(575+(全局登陆宽度-800)/2,300)
  self.前进一个方向:显示(730+(全局登陆宽度-800)/2,300)
  self.一号染色:显示(580+(全局登陆宽度-800)/2,165,true,1)
  self.二号染色:显示(640+(全局登陆宽度-800)/2,165,true,1)
  self.三号染色:显示(700+(全局登陆宽度-800)/2,165,true,1)

  self.人物站立:显示(550+(全局登陆宽度-800)/2,135,true,1)
  self.人物奔跑:显示(610+(全局登陆宽度-800)/2,135,true,1)
  self.人物攻击:显示(670+(全局登陆宽度-800)/2,135,true,1)
  if self.选中人物 ~= 0 then
    self.人物随机名字:显示(395+(全局登陆宽度-800)/2,545)
  end
  self.人物施法:显示(730+(全局登陆宽度-800)/2,135,true,1)
  if self.选中人物 ~= 0 then
    self.控件类:显示(x,y)
    self.mc:置可视(true,true)
    self.影子:显示(108+(全局登陆宽度-800)/2,493)
    self.dh[self.状态][self.选中人物][self.dz]:显示(673+(全局登陆宽度-800)/2,301)
  else
    self.mc:置可视(false,false)
  end
  self.上一步:显示(527+(全局登陆宽度-800)/2,540)
  self.下一步:显示(667+(全局登陆宽度-800)/2,540)
  if self.选中人物 ~= 0 then
    self.dtx[self.状态][self.选中人物]:显示(150+(全局登陆宽度-800)/2,116)
    self.文字[self.状态][self.选中人物]:显示(0,0)
  end

  if self.上一步:事件判断() then
    self.选中人物 = 0
    self.dz = "静立"
    self.fx = 4
    self.染色ID = 0
    self.状态=1
    self.mc:置可视(false,false)
    tp.进程 = 3
  elseif self.下一步:事件判断() then
    if self.选中人物 == 0 then
      tp.提示:写入("#Y/请选择一个人物进入游戏")
    else
         local fun  = require("ffi函数")
        self.发送信息 = {
        账号=游戏账号,
        名称=self.mc:取文本(),
        密码=游戏密码,
        编号=self.状态,
        序号=self.选中人物,
        }
        客户端:发送(2,cjson.encode(self.发送信息))
        xjzh =true
    end
  end
end

return 场景类_创建